<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@ include file="/common/include/page.jsp" %>
<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="Bookmark" href="/favicon.ico" >
<link rel="Shortcut Icon" href="/favicon.ico" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5shiv.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>

<![endif]-->
<link rel="stylesheet" type="text/css" href="${rootPath }/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="${rootPath }/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="${rootPath }/lib/Hui-iconfont/1.0.8/iconfont.css" />

<link rel="stylesheet" type="text/css" href="${rootPath }/static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="${rootPath }/static/h-ui.admin/css/style.css" />
<script type="text/javascript" src="${rootPath }/lib/ueditor/1.4.3/ueditor.config.js"></script> 
<script type="text/javascript" src="${rootPath }/lib/ueditor/1.4.3/ueditor.all.min.js"> </script> 
<script type="text/javascript" src="${rootPath }/lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<!--/meta 作为公共模版分离出去-->

<link href="${rootPath }/lib/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="page-container">
	<form id="form-codeing" class="form form-horizontal" method="post"  action="${rootPath }/back/course_<%=request.getParameter("type") %>.htm" enctype="multipart/form-data">
	<c:if test='<%=request.getParameter("type").equals("edit") %>'>
			<input type="hidden" name="id" value="${course.id }"/>
			<input type="hidden" name="courseImg" value="${course.courseImg }"/>
	</c:if>
  	<div class="row cl">
		<label class="form-label col-xs-4 col-sm-2">课程名称：</label>
		<div class="formControls col-xs-8 col-sm-9">
			<input type="text" class="input-text" value="${course.courseName}" name="courseName" placeholder="课程名称" required> 
		</div>
	</div>
	<div class="row cl">
		<label class="form-label col-xs-4 col-sm-2">课程简介：</label>
		<div class="formControls col-xs-8 col-sm-9">
			<input type="text" class="input-text" value="${course.courseInstruction}" placeholder="课程简介" name="courseInstruction" required> 
		</div>
	</div>
	
	<div class="row cl">
		<label class="form-label col-xs-4 col-sm-2">课程图片：</label>
		<div class="formControls col-xs-8 col-sm-9">
		<input type="file" name="courseImage"/>
		<img alt="" src="${rootPath }${course.courseImg}">
		</div>
	</div>
	<div class="row cl">
		<label class="form-label col-xs-4 col-sm-2">课程链接：</label>
		<div class="formControls col-xs-8 col-sm-9">
			<input type="text" class="input-text" value="${course.link}" placeholder="课程链接" name="link" required> 
		</div>
	</div>
	<div class="row cl">
		<label class="form-label col-xs-4 col-sm-2">所属分类：</label>
		<div class="formControls col-xs-8 col-sm-9">
			<%-- <input type="text" class="input-text" value="${course.groupName}" placeholder="所属分类" name="groupName" required>  --%>
			<select name="groupName" aria-controls="DataTables_Table_0" class="select">
				<option value="jiuyi" >玖益学社</option>
				<option value="chiyi" >赤翼社</option>
			</select>
			
		</div>
	</div>
	<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2">课程内容：</label>
			<div class="formControls col-xs-8 col-sm-9"> 
				<script id="editor" type="text/plain" style="width:100%;height:400px;" name="courseContent">
					${course.courseContent}
				</script> 
			</div>
		</div>
	<div class="row cl" style="text-align: center;">
		<input type="submit" value="保存"  class="btn btn-success"/>
	</div>
</form>
</div>
<script type="text/javascript">
var ue = UE.getEditor('editor');
</script>
</body>
</html>